package linkedHashMap;

import java.text.*;
import java.util.*;

public class OrderedAccess {
	public static void main(String[] args){
		String months[] = new DateFormatSymbols().getMonths();
		String italianMonths[] = new DateFormatSymbols(Locale.ITALIAN).getMonths();
		List list = Arrays.asList(months);
		Set orderedSet = new LinkedHashSet(list);
		Set unorderedSet = new HashSet(list);
		
		System.out.println("Ordered: " + orderedSet);
		System.out.println("Unordered: " + unorderedSet);
		
		Map orderedMap = new LinkedHashMap();
		Map unorderedMap = new HashMap();
		
		for(int i=0 , n=months.length ; i<n ; i++){
			orderedMap.put(months[i], italianMonths[i]);
			unorderedMap.put(months[i], italianMonths[i]);
		}
		
		
	}
}
